Transform coding and decoding of video data usually includes what is called entropy coding. For compression, the pixel information of a picture, e.g., of a residual picture after motion compensated prediction, or of a picture for intra-coding is divided into blocks. The blocks are transformed, e.g., by a discrete cosine transform (DCT) or a similar transform, and the resulting transform coefficients are quantized. The quantized transform coefficients are ordered, e.g., from low to higher frequencies along a path in the two dimensional transform domain. The ordered series of quantized transform coefficients is then losslessly encoded by an entropy coding method. One popular entropy coding method is variable length coding in which one or more events, representing one or more quantized coefficients of properties thereof are encoded by codewords such that events that are more likely-to-occur are encoded on average by codewords that are shorter than are events that are less likely-to-occur. Variable length coding (VLC), due to its nice tradeoff in efficiency and simplicity, has been widely used in entropy coding, particularly when the codec is desired to have low computational complexity.
The coding methods disclosed in U.S. Ser. No. 12/016,441 include a two-way position and amplitude coding process for a series of quantized coefficients. Positions of non-zero quantized transform coefficients are ordered, e.g., in a forward zigzag scan order and by multiple VLC tables with adaptive table switch based on the context. By context is meant one or more items of information determinable from previously encoded information and useful in predicting behavior, e.g., information determined from previously coded coefficients. Amplitudes of the quantized coefficients, on the other hand, are coded in an order reverse to the forward zigzag scan order and are regrouped into sub-sequences according to their adjacency to zeros. These subsequences are coded with different respective (multidimensional) VLC mappings that have different dimensionality.
The coding methods disclosed in U.S. Ser. No. 12/030,821 include encoding the run-length of each cluster of non-zero valued quantized coefficients and the run-length of each cluster's preceding zero coefficients together as a pair, in combination with a parameter that indicates the number of trailing coefficients in that non-zero cluster that have a amplitude of 1. Remaining amplitudes are coded separately by a one-dimensional VLC mapping, e.g., a code table.
Each of the methods described in U.S. Ser. No. 12/030,821 and U.S. Ser. No. 12/016,441 offers advantage.